<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/elementui/index.css">
    <style>
        ol, ul {list-style: none outside none;}
        .shop_content{float:left;height:140px;position:relative;padding-left:200px;padding-top:25px;font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif;
            font-size: 13px;
            color: #393939;
            line-height: 1.5;}
        .shop_content li{ margin:5px 0px; height:32px; float:left; width:245px}
        .shop_content li.shop_name{ width:100%; float:none; position:relative}
        .shop_logo{ height:190px; width:190px; float:left; margin-right:10px; position:absolute;}
        .shop_content li .label_name{ display:block; width:90px; text-align:right; float:left}
        .shop_content li .info{ display:block; float:left; margin-left:10px;}
        .Store_Introduction{ border:1px solid #dddddd; position: relative; margin-top:35px;}
        .Store_Introduction .title_name{ background-color:#FFF; position:absolute; top:-20px; font-size:18px; left:20px !important; padding:5px 20px;}
        .Store_Introduction .info{ margin:20px; line-height:24px;}
        .margin {
            margin: 15px;
        }
        .image-slot{
            display: flex;
            justify-content: center;
            align-items: center;
            width: 190px;
            height: 190px;
            background: #f5f7fa;
            color: #909399;
            font-size: 14px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .el-upload-list__item {
            transition: all .5s cubic-bezier(.55,0,.1,1);
            font-size: 14px;
            color: #606266;
            line-height: 1.8;
            margin-top: 5px;
            position: relative;
            box-sizing: border-box;
            border-radius: 4px;
            width: 200px;
        }
        .Button_operation {
            width: 360px;
            margin-top: 20px;
            margin-left: auto;
            margin-right: auto;
        }
    </style>
</head>
<body>
<div id="app">
    <div class="margin" style="width: 100%;height: 241px" :data="companyData">
        <div class="shop_logo">
            <el-image
                    :src="'http://121.5.226.17/images/'+companyData.companyImage"
            >
                <div slot="error" class="image-slot">
                    <i class="el-icon-picture-outline"></i>
                </div>
            </el-image>
        </div>
        <ul class="shop_content" >
            <li class="shop_name"><label class="label_name">企业名称：</label><span class="info">{{companyData.companyName}}</span>
            <li><label class="label_name">企业类型：</label><span class="info">{{companyData.companyType}}</span></li>
            <li><label class="label_name">经营范围：</label><span class="info">{{companyData.businessScope}}</span></li>
            <li><label class="label_name">成立日期：</label><span class="info">{{companyData.creatTime}}</span></li>
            <li><label class="label_name">状&nbsp;&nbsp;&nbsp;&nbsp;态： </label>&nbsp;&nbsp;<span class="label label-success radius" :style="companyData.companyStatus=='on'?'background-color:#67C23A':'background-color:#F56C6C'">{{companyData.companyStatus=='on'?'已认证':'未认证'}}</span></li>
            <li><label class="label_name">法人：</label><span class="info">{{companyData.legal}}</span></li>
            <li><label class="label_name">电子邮箱：</label><span class="info">{{companyData.companyEmail}}</span></li>
            <li><label class="label_name">固定电话：</label><span class="info">{{companyData.fixedTel}}</span></li>
        </ul>
    </div>
    <div class="Store_Introduction">
        <div class="title_name">企业简介</div>
        <div class="info" :data="companyData">
            <p v-if="companyData.companyIntroduction!=null & companyData.companyIntroduction!=''">{{companyData.companyIntroduction}}</p>
        </div>
    </div>
    <div class="Store_Introduction">
        <div class="title_name">申请成为</div>
        <div class="info">
            <div class="form-group">
                <template>
                    <!-- `checked` 为 true 或 false -->
                    <el-checkbox v-model="checkedCustomer" disabled>客户</el-checkbox>
                </template>
                <template>
                    <!-- `checked` 为 true 或 false -->
                    <el-checkbox v-model="checkedSupplier" disabled>供应商</el-checkbox>
                </template>
            </div>
            <div class="form-group" style="font-size: 13px;"><i style="color:#FF0000;font-style: normal;">*</i><i style="color:#999999;font-style: normal;">选择客户可设置对方直购价，发送后对方可见</i></div>
            <div class="form-group" style="font-size: 13px;"><i style="color:#FF0000;font-style: normal;">*</i><i style="color:#999999;font-style: normal;">选择经销商可上传合同附件，通过后可查看直购价</i></div>
        </div>
    </div>
    <div class="Button_operation">
        <el-button type="info" onclick="window.location.href = '/clientele-cooperat.html'">返回上一步</el-button>
    </div>
</div>
<script src="/vue/vue.js"></script>
<script src="/axios/axios.min.js"></script>
<script src="/qs/qs.min.js"></script>
<script src="/elementui/index.js"></script>
<script>
    new Vue({
        el:'#app',
        data(){
            return{
                companyData:[],
                companyId:localStorage.getItem("companyId"),
                checkedCustomer:false,
                checkedSupplier:false,
            }
        },
        methods:{

        },
        mounted(){
            axios.get('/company/'+this.companyId).then(value => {
                if (value.data.state==1){
                    this.companyData=value.data.data;
                    axios.get('/TPars/'+this.companyId).then(value1 => {
                        if (value.data.state==1){
                            var _this=this;
                            value1.data.data.forEach(function (s) {
                                if (s.tParRel==0){
                                    _this.checkedCustomer=true;
                                }else if (s.tParRel==1){
                                    _this.checkedSupplier=true;
                                }
                            })
                        }
                    })
                }
            })
        }
    })
</script>
</body>
</html>